import axios from 'axios';
import { id } from 'element-plus/es/locales.mjs';

//创建axios实例
export const Service = axios.create({
  baseURL: 'http://localhost:8080',
  headers:{
    'Content-Type': "application/json;charset=UTF-8"
  },
  timeout:3000
});

export const pageList = (payload)=>{
    return Service.get('/maintenance/pageQuery', {params: payload})
}

export const addMaintenance = (form_add)=>{
    return Service.post('/maintenance/add', form_add)
}

export const updateMaintenance = (form)=>{
    return Service.put('/maintenance/update', form)
}

export const deleteMaintenance = (id)=>{
    return Service.delete('/maintenance/delete', { params: { id }})
}

export const getMaintenanceList = (id)=>{
    return Service.get('/maintenance/listById', {params: { id }})
}